﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DateTime?>" %>

 <%string name = ViewData.TemplateInfo.HtmlFieldPrefix;%>  
 <%string id = name.Replace(".", "_");%>  

 <div class="editor-field">  
     <%= Html.TextBoxFor(model => model, new { @maxlenght = "30"})%>  
     <%= Html.ValidationMessageFor(model => model) %>  
 </div>  
   
 <script type="text/javascript">  
     $(document).ready(function() {  
   
         $("#<%=id%>").datepicker({  
             showOn: 'both',  
             dateFormat: 'dd M yy',  
             changeMonth: true,  
             changeYear: true  
         });  
     });  
 </script>  